{extend name="public/father" /}

{block name='main'}
<div class="layui-card">
    <div class="layui-card-header">视频管理</div>
    <div class="layui-card-body">

<!--        <blockquote class="layui-elem-quote layui-quote-nm">-->
<!--            <p>标题中可以加入{city} 代表所在城市，{emoji} 代表随机表情</p>-->
<!--        </blockquote>-->

        <div class="layui-btn-container">
            <button class="layui-btn" onclick="openUrl('添加', 'lastcreate', 800);return false;"><i class="layui-icon layui-icon-addition"></i>添加</button>
            <button class="layui-btn layui-btn-primary" onclick="javascript:location.reload();"><i class="layui-icon layui-icon-ok-circle"></i> 刷新</button>
        </div>

        <table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>

        <script type="text/html" id="status">
            {{ d.status==1 ? '已启用' : '<span style="color: orange;">已禁用</span>' }}
        </script>

       
        <script type="text/html" id="img">
            <img onclick="showImg(this.src);" src="{{ d.img }}" style="max-width: 100%;" alt="">
        </script>

        <script type="text/html" id="rukou">
            <div class="layui-btn-group">
                <a class="layui-btn layui-btn-sm layui-btn-primary" href="{:fission('https')}://{{d.domain}}/JMThc/{{ d.alias }}.html" target="_blank"><i class="layui-icon layui-icon-link"></i>打开</a>
                <a class="layui-btn layui-btn-sm layui-btn-primary" onclick="layer.alert('{:fission(\'https\')}://{{d.domain}}/JMThc/{{ d.alias }}.html', {title: false,shade: 0.5,closeBtn: 1,shadeClose: true,anim: 3,btn:false});"><i class="layui-icon layui-icon-search"></i>网址</a>
            </div>
        </script>

        <script type="text/html" id="barDemo">
            <div class="layui-btn-group">
                <a class="layui-btn layui-btn-sm layui-btn-primary" lay-event="lastedit"><i class="layui-icon layui-icon-edit"></i>修改</a>
                <a class="layui-btn layui-btn-sm layui-btn-primary" lay-event="lastdel" data-table="quns"><i class="layui-icon layui-icon-delete"></i>删除</a>
            </div>
        </script>

    </div>
</div>
{/block}


{block name="js"}
<script>
    layui.use(['table', 'layer', 'form'], function() {
        var table = layui.table,
            layer = layui.layer,
            form = layui.form,
            $ = layui.jquery;

        table.render({
            elem: '#dataTable',
            url: "{:url()}",
            title: '数据表',
            size: 'lg',
            limit: 20,
            cols: [
                [
                    {field: 'left',		title:'操作',		width:160,		align:'center',		toolbar:'#barDemo'},
                    {field: 'rukou',	title:'入口网址',		width:240,		align:'center',		templet:'#rukou'},
                    {field: 'title',	title:'视频标题',		minWidth:200},
                    // {field: 'miao',	title:'秒',		width:80,	sort:true},
                    {field: 'img',		title:'图片',		width:120,		align:'center',		templet:'#img'},
                    // {field: 'view',		title:'访问量',		width:100,		align:'center',	sort:true},
                    {field: 'adminname',		title:'所属用户',		width:100,		align:'center',	},
                    // {field: 'username',		title:'所属用户',	width: 100,		align: 'center'}
                ]
            ],
            page: true
        });

    });
</script>
{/block}
